import request from '@/utils/request'

// 查询木业供应商信息列表
export function listWoodSupplierMessage(query) {
  return request({
    url: '/woodSupplier/woodSupplierMessage/list',
    method: 'get',
    params: query
  })
}

// 查询木业供应商信息详细
export function getWoodSupplierMessage(supplierId) {
  return request({
    url: '/woodSupplier/woodSupplierMessage/' + supplierId,
    method: 'get'
  })
}

// 新增木业供应商信息
export function addWoodSupplierMessage(data) {
  return request({
    url: '/woodSupplier/woodSupplierMessage',
    method: 'post',
    data: data
  })
}

// 修改木业供应商基础数据状态
export function editWoodSupplierMessage(supplierId,status) {
  const data = {
    supplierId,
    status
  }
  return request({
    url: '/woodSupplier/woodSupplierMessage/editSupplierState',
    method: 'put',
    data: data
  })
}

// 分配采购员
export function editBusinessPersonnel(data) {
  return request({
    url: '/woodSupplier/woodSupplierMessage/editSupplierAllotEmployee',
    method: 'put',
    data: data
  })
}

// 修改木业供应商信息
export function updateWoodSupplierMessage(data) {
  return request({
    url: '/woodSupplier/woodSupplierMessage',
    method: 'put',
    data: data
  })
}

// 删除木业供应商信息
export function delWoodSupplierMessage(supplierId) {
  return request({
    url: '/woodSupplier/woodSupplierMessage/' + supplierId,
    method: 'delete'
  })
}

// 导出木业供应商信息
export function exportWoodSupplierMessage(query) {
  return request({
    url: '/woodSupplier/woodSupplierMessage/export',
    method: 'get',
    params: query
  })
}
